package com.tianji.learning.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tianji.api.dto.IdAndNumDTO;
import com.tianji.api.dto.leanring.LearningLessonDTO;
import com.tianji.api.dto.leanring.LearningRecordFormDTO;
import com.tianji.learning.domain.po.LearningRecord;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 学习记录表 服务类
 * </p>
 *
 * @author xjs
 */
public interface ILearningRecordService extends IService<LearningRecord> {

    LearningRecord getByLessonIdSectionId(Long userId, Long lessonId, Long sectionId);

    LearningLessonDTO queryLearningRecordByCourse(Long courseId);

    void addLearningRecord(LearningRecordFormDTO formDTO);

    /**
     * 查询用户每周已学习的小节数量
     * */
    List<IdAndNumDTO> queryFinishedSectionNum(Long userId, LocalDateTime begin, LocalDateTime end);
}
